<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="<?=gurl('css');?>/admin.css" />
<script language="javascript" src="<?=gurl('js');?>/jq.js"></script>
<script language="javascript" src="<?=gurl('js');?>/common.js"></script>
<style type="text/css">
.listmenu li, .listitem li{ width:80px;}
</style>
</head>
<body>
	<h3 style="background:#E5ECF3; padding:5px; font-size:12px;">> <a href="<?=site_url(rnadminpath().'/main/show/main');?>">首页</a> > <a href="#">管理广告</a></h3>
	<div style="margin-top:10px;padding:5px;border:1px solid #9FACB7;">
		<ul class="listmenu">
			<li style="width:60px;">选择</li>
			<li>广告位</li>
			<li>广告名称</li>
			<li>广告内容</li>
			<li>发布日期</li>
			<li>结束日期</li>
			<li>状态</li>
			<li class="lastitem">操作</li>
		</ul>
		<div class="clear"></div>
		<? if(is_array($items) && count($items)>0):?>
		<? foreach ($items as $item):?>
		<ul class="listitem">
			<li style="width:60px;"><input type="checkbox" name="id[]" id="id[]" value="<?=$item['adsid'];?>"></li>
			<li><?=$item['place']['placename'];?></li>
			<li><?=$item['adsname'];?></li>
			<li><a href="<?=$item['linkurl'];?>"><img src="<?=gurl('data/upload_pic');?>/<?=$item['imageurl'];?>" width="80px" border="0"></a></li>
			<li><?=date("Y-m-d",$item['fromdate']);?></li>
			<li><? if($item['todate']>0):?><?=date("Y-m-d",$item['todate']);?><? endif;?></li>
			<li><? if($item['passed'] == '1'):?><? if($item['todate']>0 && $item['todate'] <= time()):?><font color="orange">过期</font><? else:?><font color="Green">启用</font><? endif;?><? else:?><font color="Red">禁用</font><? endif;?></li>
			<li class="lastitem">
				<a href="<?=site_url(rnadminpath().'/ads/edit/'.$item['adsid']);?>">编辑</a>
				<a href="<?=site_url(rnadminpath().'/ads/delete/'.$item['adsid']);?>"  onclick="return confirm('确认删除吗');">删除</a>
			</li>
		</ul>
		<div class="clear"></div>
		<? endforeach;?>
		<? endif;?>
	</div>
	<div style="padding:5px;margin-top:10px;text-align:left;">
		<input type="button" onClick="checkall();" value="全选">
		<input type="button" onClick="delselected('<?=gurl(rnadminpath().'/ads/statuselected');?>');" value="屏蔽">
		<input type="button" onClick="delselected('<?=gurl(rnadminpath().'/ads/delselected');?>');" value="删除">
		<input type="button" onClick="window.history.go(-1);" value="返回">
	</div>
	<div class="pagestring">
		<?=$pagestring;?>
	</div>
</body>
</html>
